﻿using System.Web;
using System.Text;
using System.IO;
using System.Net;
using System;
using System.Collections.Generic;

namespace Com.Allscore
{
    /// <summary>
    /// 类名：Config
    /// 功能：基础配置类
    /// 详细：设置商户有关信息及返回路径
    /// 版本：1.0
    /// 日期：2011-12-20
    /// 说明：
    /// 以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
    /// 该代码仅供学习和研究商银信接口使用，只是提供一个参考。
    /// 
    /// 提示：如何获取安全校验码、商户号
    /// 1.致电商银信客服热线（400-620-7575）进行咨询
    /// 
    /// </summary>
    internal class Config
    {
        #region 字段
        private static string service = "";
        private static string merchantId = "";
        private static string notify_url = "";
        private static string return_url = "";
        private static string detail_url = "";
        private static string input_charset = "";
        private static string sign_type = "";
        private static string subject = "";
        private static string body = "";
        private static string outOrderId = "";
        private static string outAcctId = "";
        private static string pay_method = "";
        private static string default_bank = "";
        private static string channel = "";
        private static string card_attr = "";
        private static string card_type = "";
        private static string allscore_merchantId = "";

        private static string allscore_publicKey = "";

        private static string allscore_md5_key = "";


        private static string privateKey = "";
        private static string allscore_gateway_url="";
        private static string allscore_query_url = "";

        private static string allscore_partrefund_url = "";


        private static string allscore_refund_url = "";







        #endregion

        static Config()
        {
            //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

            //商户id
            merchantId = "001016051701753";



            //服务器异步通知页面路径，要用 http://格式的完整路径，不允许加?id=123这类自定义参数
            notify_url = "http://baifupay.34537.com/notifyRSA.aspx";

            //搜房宝开户
            return_url = "returnMD5.aspx";

            //网关消费地址
            // 接入URL：https://paymenta.allscore.com/olgateway/serviceDirect.htm
            // 测试URL：http://58.132.206.38:8090/olgateway/serviceDirect.htm  | https://sdktest.allscore.com/olgateway/serviceDirect.htm
            allscore_gateway_url = "https://paymenta.allscore.com/olgateway/serviceDirect.htm";
            //网关订单查询地址
            allscore_query_url = "http://211.157.145.8:8090/olgateway/orderQuery.htm";
            //网关退货地址(纯银行卡支付)
            allscore_partrefund_url = "http://211.157.145.8:8090/olgateway/partRefund.htm";
            //网关退货地址(快捷和帐户)
            allscore_refund_url = "http://211.157.145.8:8090/olgateway/refund.htm";

            privateKey = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAIHyeQxpn4hoqPZiOjn7xyyNSrrwGOCeBfVx4BwXQUg53PY2qwqOFL16qfJlEDeXGCfOJrrb3wEbflhTnL2SdUqbLBihRm/CKra7llGUjRCxG3D9RedZWS0XxOUpXWYcBTVMXOOAY6ufOaYNWeNrgRHioFYhK8Zo7ZEVAEpywVHfAgMBAAECgYBduq5zNJBcjNkqdil3f1LnoLZBZkMbaP/1TQEQYfm1hf8KHN58S4VMMnj4nMr4veQvefPXnhYZL2KPhSeuWUB92ZtGnprVCF8BxwJFVMa6K/D+DgF1SXEUinD8nDTTaN4JAmxk4mQRfKrsQRhdN6B4/qSn9463bY1rWavQ8Q7FMQJBAM41NLY8bFb/MZkSQ1lnH4p4OmPd/TrHwNfqbr4AmSwDjkdSbnVSSYZLWPJy3YnG/h8FKcep+K0Q3Wcfwk5HMfkCQQChUzE4hde1V3NRRhKJQyM/MkKv1D2nwk81T9FmbpT8Qm8tWMq8M3bQPDtaSzyURPvIg7nTPX86ZIJLRO2Pj5iXAkEArbFNdE9TJriQa5JhnpXpkHaTIHnlirSlcHnszCiu3M8l8lex6Srl+bPP+XDdwOcYOMLdnWxDpmu1Qt8SiWMY6QJBAIHZQk7qe/s8TldmfVj6Lw6Y19BKlu3Gmpagjj1SWJzKpE3toBDno4RsVqGQ2UvGUprMW+/JGfTYHX+UFVpuDDUCQQCR9j/3HWthaoYaWMNKV5wYfb41rnHGdGNtcJ96uF7KHivsrQy8ryH/zWm7XDuxFVrHHq+cjBZQsj8Urg2IXCOb";

            allscore_publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCB8nkMaZ+IaKj2Yjo5+8csjUq68BjgngX1ceAcF0FIOdz2NqsKjhS9eqnyZRA3lxgnzia6298BG35YU5y9knVKmywYoUZvwiq2u5ZRlI0QsRtw/UXnWVktF8TlKV1mHAU1TFzjgGOrnzmmDVnja4ER4qBWISvGaO2RFQBKcsFR3wIDAQAB";
            

            allscore_md5_key = "22c531a0d83a46b0988ffdb038646b5b";

            //字符编码格式 请使用 utf-8
            input_charset = "UTF-8";

            sign_type = "CA";

            //商银信 商户ID
            allscore_merchantId = "001016051701753";
            //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

            
        }

        

        #region 属性


        /// <summary>
        /// MD5 秘钥
        /// </summary>
        public static string md5Key
        {
            get { return allscore_md5_key; }
            set { allscore_md5_key = value; }
        }

        /// <summary>
        /// 获取或设置商户id
        /// </summary>
        public static string MerchantId
        {
            get { return merchantId; }
            set { merchantId = value; }
        }




        /// <summary>
        /// 获取服务器异步通知页面路径
        /// </summary>
        public static string Notify_url
        {
            get { return notify_url; }
        }

        /// <summary>
        /// 获取字符编码格式
        /// </summary>
        public static string Input_charset
        {
            get { return input_charset; }
        }


        /// <summary>
        /// 获取签名类型
        /// </summary>
        public static string SignType

        {
            get { return sign_type; }
        }


        /// <summary>
        /// 获取商银信商户号
        /// </summary>
        public static string allscoreMerchantId
        {
            get { return allscore_merchantId; }
        }


        public static string Subject
        {
            get { return Config.subject; }
            set { Config.subject = value; }
        }


        public static string Body
        {
            get { return Config.body; }
            set { Config.body = value; }
        }



        public static string OutOrderId
        {
            get { return Config.outOrderId; }
            set { Config.outOrderId = value; }
        }



        public static string OutAcctId
        {
            get { return Config.outAcctId; }
            set { Config.outAcctId = value; }
        }



        public static string Service
        {
            get { return Config.service; }
            set { Config.service = value; }
        }

        public static string Return_url
        {
            get { return Config.return_url; }
            set { Config.return_url = value; }
        }

        public static string Detail_url
        {
            get { return Config.detail_url; }
            set { Config.detail_url = value; }
        }

        public static string Sign_type
        {
            get { return Config.sign_type; }
            set { Config.sign_type = value; }
        }

        public static string Pay_method
        {
            get { return Config.pay_method; }
            set { Config.pay_method = value; }
        }


        public static string Default_bank
        {
            get { return Config.default_bank; }
            set { Config.default_bank = value; }
        }


        public static string Channel
        {
            get { return Config.channel; }
            set { Config.channel = value; }
        }


        public static string Card_attr
        {
            get { return Config.card_attr; }
            set { Config.card_attr = value; }
        }



        public static string Card_type
        {
            get { return Config.card_type; }
            set { Config.card_type = value; }
        }

        public static string Allscore_merchantId
        {
            get { return Config.allscore_merchantId; }
            set { Config.allscore_merchantId = value; }
        }

        public static string PublicKey
        {
            get { return Config.allscore_publicKey; }
            set { Config.allscore_publicKey = value; }
        }

        public static string PrivateKey
        {
            get { return Config.privateKey; }
            set { Config.privateKey = value; }
        }

        public static string Allscore_gateway_url
        {
            get { return Config.allscore_gateway_url; }
            set { Config.allscore_gateway_url = value; }
        }


        public static string Allscore_query_url
        {
            get { return Config.allscore_query_url; }
            set { Config.allscore_query_url = value; }
        }

        public static string Allscore_partrefund_url
        {
            get { return Config.allscore_partrefund_url; }
            set { Config.allscore_partrefund_url = value; }
        }


        public static string Allscore_refund_url
        {
            get { return Config.allscore_refund_url; }
            set { Config.allscore_refund_url = value; }
        }


        #endregion

    }
}